<template>
  <div>
    <el-table
      :data="userList"
      :stripe="true"
      style="width: 100%">
      <el-table-column
        prop="id"
        label="编号">
      </el-table-column>
      <el-table-column
        prop="email"
        label="邮箱">
      </el-table-column>
      <el-table-column
        prop="nickname"
        label="昵称">
      </el-table-column>
      <el-table-column
        prop="password"
        label="密码">
      </el-table-column>
    </el-table>
    <router-view/>
  </div>
</template>

<script>
    export default {
        name: "userList",
      data(){
          return {
            userList:[]
          }
      },
      created(){
        //发出ajax请求请求后端代码
        let url="/user/selectAll";
        this.axios.get(url).then((resp)=>{
          this.userList=resp.data;
        });
      }
    }
</script>

<style scoped>

</style>
